//
//  SDNetwork.h
//  skinDetection
//
//  Created by  liangzhun on 2018/11/7.
//  Copyright © 2018年  liangzhun. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
typedef void(^finishBlock)(NSDictionary * __nullable dic,NSError * __nullable error);
@interface SDNetwork : NSObject
+ (nullable NSString *)senderToJSONWith:(nonnull id)sender;
+ (nullable NSString * )dicToJSONWith:(nonnull NSDictionary *)dic;
+ (nullable NSDictionary *)jsonStringToDic:(nonnull NSString *)jsonStr;

/**
 短信登录
 
 @param parameters 登录参数
 @param finish block传回数据
 */
+ (void)postSMSLoginWithParameters:(NSDictionary *)parameters finish:(finishBlock)finish;

/**
 第三方登录
 
 @param parameters 登录参数
 @param finish block传回数据
 */
+ (void)postThirdLoginWithParameters:(NSDictionary *)parameters finish:(finishBlock)finish;

/**
 获取验证码
 
 @param parameters 获取验证码的参数
 @param finish block传回数据
 */
+ (void)getVerCodeWithParameters:(NSDictionary *)parameters finish:(finishBlock)finish;

/**
 绑定手机号码
 
 @param parameters 绑定手机好的参数
 @param finish block传回数据
 */
+ (void)postBoundNumebrWithParameters:(NSDictionary *)parameters finish:(finishBlock)finish;

/**
 皮肤检测类别细分
 
 @param parameters 获取验证码的参数
 @param finish block传回数据
 */
+ (void)getSkinTypeDetailWithParameters:(int)parameters finish:(finishBlock)finish;

/**
 获取商品列表
 
 @param finish block传回数据
 */
+ (void)getProductListFinish:(finishBlock)finish;

/**
 获取类别商品列表
 
 @param type 商品类别
 @param finish block传回数据
 */
+ (void)getProductCategoryListWithTypeId:(int)type Finish:(finishBlock)finish;

/**
 获取我的检测报告

 @param finish block数据回传
 */
+ (void)getMyCheckReportListWithFinish:(finishBlock)finish;


/**
 获取用户检测报告列表

 @param finish block数据回传
 */
+ (void)getCustCheckReportListWithFinish:(finishBlock)finish;


/**
 获取报告详情

 @param ID 报告ID
 @param finish block数据回传
 */
+ (void)getReportinfoWithReportId:(int)ID Finish:(finishBlock)finish;


/**
 问卷调查

 @param skinType 皮肤状态
 @param finish block数据回传
 */
+ (void)getQuestionSurveyWithSkinTypeId:(int)skinType Finish:(finishBlock)finish;


/**
 删除检测报告

 @param parameter 是否是我的报告和报告ID
 @param finish block数据回传
 */
+ (void)postDeleteReportWithParameter:(NSString *)parameter finish:(finishBlock)finish;


/**
 获取个人推荐商品列表

 @param skinSubId 皮肤类型详情的ID
 @param byUser 是否根据用户推荐商品
 @param finish block数据回传
 */
+ (void)getProductRecommendWithSkinSubId:(int)skinSubId ByUser:(BOOL)byUser Finish:(finishBlock)finish;



/**
 生成检测报告

 @param finish block数据回传
 */
+ (void)postGenerateReportFinish:(finishBlock)finish;

/**
 获取个人推荐商品列表（检测完）

 @param skinSubIdStr 皮肤类型拼成的字符串
 @param byUser 是否传userID
 @param finish block数据回传
 */
+ (void)getProductRecommendAllWithSkinSubIdStr:(NSString *)skinSubIdStr ByUser:(BOOL)byUser Finish:(finishBlock)finish;

/**
 第三方登录开关

 @param finish block数据回传
 */
+ (void)getTurnThirdLoginFinish:(finishBlock)finish;

/**
 问卷调查
 
 @param finish block数据回传
 */
+ (void)getQuestionSurveyAllFinish:(finishBlock)finish;

/**
 获取问卷调查结果

 @param resultID 肤型ID
 @param answer 选择的答案
 @param finish block数据回传
 */
+ (void)getQuestionResultWithID:(int)resultID Answer:(NSString *)answer Finish:(finishBlock)finish;

/**
 生成问卷调查报告

 @param parame 所有的测试结果
 @param finish block数据回传
 */
+ (void)postQuestionGenerateReportWithParame:(NSDictionary *)parame Finish:(finishBlock)finish;

/**
 获取问卷调查报告列表
 
 @param finish block数据回传
 */
+ (void)getGetAllQuestionReportWithFinish:(finishBlock)finish;

/**
 删除问卷调查报告
 
 @param parameter 报告ID
 @param finish block数据回传
 */
+ (void)postDeleteQuestionReportWithParameter:(NSString *)parameter finish:(finishBlock)finish;

/**
 获取问卷调查报告详情
 
 @param reportID 报告ID
 @param finish block数据回传
 */
+ (void)getQuestionReportDetailWithID:(int)reportID Finish:(finishBlock)finish;
@end

NS_ASSUME_NONNULL_END
